﻿using AJWPFAdmin.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EntranceGuardClient.Services
{
    public class FolderBrowserBridge : IFolderBrowserBridge
    {
        public string GetFolder(string defaultFolder)
        {
            var dialog = new FolderBrowserDialog
            {
                InitialDirectory = defaultFolder ?? string.Empty,
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                return dialog.SelectedPath;
            }

            return string.Empty;
        }
    }
}
